package com.thiswhyme.illegalword.config;

import com.thiswhyme.illegalword.core.IllegalWordServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * @description: 敏感词配置类
 * @author: thiswhyme
 * @date: 2021/3/30
 */
public class IllegalWordConfig {
    
    @Bean
    @ConditionalOnMissingBean(IllegalWordServiceImpl.class)
    public IllegalWordServiceImpl illegalWordService(RedisTemplate redisTemplate) {
        return new IllegalWordServiceImpl(redisTemplate);
    }
}
